{% autoescape true %}
<html>
<head>
<link rel="stylesheet" type="text/css" href="calendar.css"/>
</head>
<body>
<form name="filterForm" method="GET">
<p>
You can add the VK2 feed extracted from the WIA calendar to your
Google Calendar by pasting this address into "Add a coworkers calendar" under
Other Calendars: g9gg0eksdrd5t99as935th4k45lg8r40@import.calendar.google.com
</p>
<p>
To create your own feed play with the filters. When you find the filters that
match your need, add &amp;format=ics to the URL and paste the URL into
&quot;Add by URL&quot; in the drop down menu next to Other Calendars in
Google Calendar or Microsoft Outlook.  An example URL would be
http://app.vk2ete.net/cal/wia?s=VK2&amp;format=ics
</p>
<div class="selection">
  <div class="selectStates">
    {%- for callsign in callsigns %}
      <input type="checkbox" name="s" value="{{callsign}}"
      {%- if callsign in selected_callsigns %}checked{%- endif %}
      >{{callsign}}</input>
    {%- endfor %}<br/>
    {%- for cat, descr in categories|dictsort %}
      <input type="checkbox" name="c" value="{{cat}}"
      {%- if cat in selected_categories %}checked{%- endif %}
      >{{descr}}</input>
    {%- endfor %}
  </div>
  <input type=submit style="selectSubmit" value="Apply Filters"/>
  <div style="clear: both;"></div>
</div>
<input type="hidden" name="format" value="html">
</form>
{%- for event in events %}
<div class="event">
<div class="eventHeading {{event.categories|join(' ') }}">
  {%- if event.callsign %}
  <span class="eventCallsign">{{ event.callsign }}</span>
  {%- endif %}
  <span class="eventDate">
    {{ event.date_start|textdate(event.date_end, event.timezone) }}
  </span>
  <span class="eventTime">
    {{ event.date_start|texttime(event.date_end, event.timezone) }}
  </span>
  <div class="eventSubject">
    {{ event.subject }}
  </div>
  <div style="clear: both;"></div>
</div>
<div class="eventContent">
  <div class="eventDescription">{{ event.description|safe }}</div>
  <div class="eventComment">{{ event.comment }}</div>
  {%- if event.location %}
  <div class="eventLocation"><i>{{ event.location }}</i></div>
  {%- endif %}
</div>
</div>
{%- endfor %}
</body>
</html>
{% endautoescape %}
